Conditional entropy is a measure of the amount of impurity, uncertainty or randomness remaining in a random variable given that another random variable is known.
In the context of classification problems, conditional entropy quantifies the uncertainty of a target variable \( Y \), which describes the set of class labels, given a category/value \( x \) of the attribute \( X \).
For a binary classification problem, conditional entropy \( E(Y|X) \) is calculated using the following formula:
\[ E(Y|X) = \sum_{x \in X} p(x) E(Y|X = x) \]
Where:
Calculating the conditional entropies for the individual categories/values \( x \) of attribute \( X \) (depicted as \( E(Category) \) in the calculator below) is possible with the following formula:
\[ E(Y|X = x) = - \sum_{y \in Y} p(y|x) log_2(p(y|x)) \]
Where:
It sums over all the possible categories/values of the class attribute \( Y \).
Conditional Entropy calculator
Class 1 | Class 2 | Ratio | E(Category) | CE(Attribute) | |
---|---|---|---|---|---|